<template>
  <teleport :to="site">
    <div class="loading w-full h-full flex bg-gray items-center fixed top-0  justify-around text-xl bg-opacity-50 yu-color-text">
      <van-loading text-color="#0094ff" />
    </div>
  </teleport>
</template>

<script setup>
import {useStore} from "@/store/index"

const store = useStore()
defineProps({
  site: {
    type: String,
    default: 'body'
  }
})
</script>

<style scoped lang="scss">
.loading {
  z-index: 10000!important;
  :deep(.van-loading) {
    color: v-bind('store.theme.textColor');
  }
}

</style>
